function find(teststr){
	teststr=teststr.toString();
	let PalindromesLen=[],Palindromes=[];
	
	for(let i=0;i<teststr.length;i++){
		//偶数回文长度
		let even=odd=i,evenstep=0,oddstep=1;

		while(teststr[even-evenstep]===teststr[even+evenstep+1]){
			if(even-evenstep<0 || even+evenstep+1>=teststr.length){
				break ;
			}
			evenstep++;
		}
		Palindromes.push(teststr.substring(even-evenstep ,even+evenstep+1))
		PalindromesLen.push(2*evenstep);
		//奇数回文长度
		while(teststr[odd-oddstep]===teststr[odd+oddstep]){
			if(odd-oddstep<0 || odd+oddstep+1>=teststr.length){
				break ;
			}
			oddstep++;
		}
		Palindromes.push(teststr.substring(odd-oddstep+1 ,odd+oddstep))
		PalindromesLen.push(2*oddstep-1);
	}

	let maxlen=Math.max.apply(Math,PalindromesLen);

	console.log("所有回文："+Palindromes);
	console.log("最大字符串为："+ Palindromes[PalindromesLen.indexOf(maxlen)]);
	console.log("最大长度为:"+ maxlen);
}